package com.empoweragile.web.filter_bullet;

import java.awt.HeadlessException;
import java.util.Collections;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Map;

import javax.servlet.FilterConfig;
import javax.servlet.ServletContext;

public class MockFilterConfig implements FilterConfig {
	
	Map<String, String> filterParameters = new HashMap<String, String>();
	
	public MockFilterConfig(){
		
	}
	
	public MockFilterConfig(Map<String, String> filterParameters){
		
		this.filterParameters = filterParameters;		
	}
	
	@Override
	public String getFilterName() {
		// TODO Auto-generated method stub
		return null;
	}

	@Override
	public String getInitParameter(String name) {
		
		return filterParameters.get(name);
	}

	@Override
	public Enumeration getInitParameterNames() {
		
		return Collections.enumeration(filterParameters.keySet());
	}

	@Override
	public ServletContext getServletContext() {
		// TODO Auto-generated method stub
		return null;
	}
	
	@Override
	public String toString(){
		return filterParameters.toString();
	}

}
